<%--
  Created by IntelliJ IDEA.
  User: zuozhongfei
  Date: 2020/5/29
  Time: 4:21 下午
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    pageContext.setAttribute("ctp",request.getContextPath());
%>
    <h1>员工修改</h1>

    <%-- 这个表单中所有的内容显示绑定的是请求域中的employee的值 --%>
    <form:form modelAttribute="employee" action="${ctp}/emp/${employee.id}" method="post">
        <input type="hidden" name="_method" value="put">
        <input type="hidden" name="id" value=${employee.id}>
        email:<form:input path="email"></form:input><br>
        gender:
            男<form:radiobutton path="gender" value="1"></form:radiobutton>
            女<form:radiobutton path="gender" value="0"></form:radiobutton><br>

        dept:
            <form:select path="department.id" items="${depts}" itemLabel="departmentName" itemValue="id"></form:select><br>
        <input type="submit" value="修改">
    </form:form>
</body>
</html>
